Skip to content

perf(client): smoother chat scrolling with wider list cache#1116

Closed
NC1107 wants to merge 1 commit into
mainfrom
perf/chat-list-cache-extent
Closed

perf(client): smoother chat scrolling with wider list cache#1116
NC1107 wants to merge 1 commit into
mainfrom
perf/chat-list-cache-extent

Conversation

@NC1107
Copy link
Copy Markdown
Owner

@NC1107 NC1107 commented May 22, 2026

Summary

The chat `ListView.builder` had no explicit `cacheExtent`, defaulting to 250px. For messages that include images, reactions, and reply quotes — each requiring a frame to lay out — momentum scrolling occasionally flashed blank space before items mounted. Bump to 600px (about one viewport) so the visible window stays warm during fast scrolling.

Test plan

  • `flutter analyze` clean
  • `flutter test test/widgets/chat_panel/` — 4/4 pass

Behind the scenes

Single-line change in `chat_message_list.dart`. No behaviour change, only smoother scrolling.

…shing

The chat ListView used Flutter's default cacheExtent of 250px, which is too
tight for messages that include images, reactions, and reply quotes — each
takes a frame to lay out, so momentum scrolling on long histories briefly
showed blank space before items mounted. Bumped to 600px (about one viewport)
so the visible window stays warm during fast scrolling.
NC1107 added a commit that referenced this pull request May 22, 2026
… 3.41.9

flutter analyze --fatal-infos on CI's 3.41.9 SDK rejects 'cacheExtent' as
deprecated in favor of 'scrollCacheExtent', but the local SDK pin (3.41.6)
hasn't picked up the rename and rejects the new name as unknown. Drop the
perf optimisation from this bundle to unblock the dev → main release. Will
reapply in a follow-up PR once the Flutter pin moves to 3.41.9 (or once we
can express it as 'cacheExtent ?? scrollCacheExtent').

Effectively reverts the chat-list change from #1116; the avatar memCacheWidth
change from #1127 (different file) stays.
@NC1107
Copy link
Copy Markdown
Owner Author

NC1107 commented May 22, 2026

Folded into bundle PR #1132 (dev → main). All commits preserved via no-ff merges; the individual PRs ship together once #1132's CI is green.

@NC1107 NC1107 closed this May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant